package com.dfbz.demo02_枚举的使用;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public enum Week {


    MONDAY(),
    TUESDAY("星期二"),
    WEDNESDAY,
    THURSDAY("星期四",3),
    FRIDAY("星期五",4),
    SATURDAY("星期六",5),
    SUNDAY("星期六",4);


    private String name;
    private Integer loveLevel;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLoveLevel() {
        return loveLevel;
    }

    public void setLoveLevel(Integer loveLevel) {
        this.loveLevel = loveLevel;
    }

    // 注意: 枚举类的构造方法只能是私有(默认情况下也是私有)
    Week() {                                    // 空参构造
    }

    Week(String name) {                         // 有参构造
        this.name = name;
    }

    Week(String name, Integer loveLevel) {      // 有参构造
        this.name = name;
        this.loveLevel = loveLevel;
    }

    public void show() {
        System.out.println("我是【" + name + "】,我的喜好程度是【" + loveLevel + "】颗星");
    }

}
